using System;
using System.Collections.Generic;
using Spring.Context;
using Spring.Context.Support;

namespace SpringSeries.Core.GenericTypes
{
    class Program
    {
        static void Main(string[] args)
        {
            IApplicationContext _ctx = ContextRegistry.GetContext();

           List<int> _col1 = (List<int>)_ctx.GetObject("ListInteger");
            _col1.Add(1);
            _col1.Add(2);
            _col1.Add(3);
            
            Console.WriteLine(_col1.GetType().ToString());

           Dictionary<string, object> _col2 = (Dictionary<string, object>)_ctx.GetObject("DictionaryStringObject");
            _col2.Add("k1", new EventArgs());
            _col2.Add("k2", new EventArgs());
            _col2.Add("k3", new EventArgs());

            Console.WriteLine(_col2.GetType().ToString());

            Dictionary<string, Dictionary<int, object>> _col3 = (Dictionary<string, Dictionary<int, object>>)_ctx.GetObject("DictionaryStringDictionaryIntObject");

            Console.WriteLine(_col3.GetType().ToString());

            Console.Read();
        }
    }
}
